import request from '@/utils/request'

// 查询新闻分类列表
export function listPressType(query) {
  return request({
    url: '/smartservice/pressType/list',
    method: 'get',
    params: query
  })
}

// 查询新闻分类详细
export function getPressType(pressTypeId) {
  return request({
    url: '/smartservice/pressType/' + pressTypeId,
    method: 'get'
  })
}

// 新增新闻分类
export function addPressType(data) {
  return request({
    url: '/smartservice/pressType',
    method: 'post',
    data: data
  })
}

// 修改新闻分类
export function updatePressType(data) {
  return request({
    url: '/smartservice/pressType',
    method: 'put',
    data: data
  })
}

// 删除新闻分类
export function delPressType(pressTypeId) {
  return request({
    url: '/smartservice/pressType/' + pressTypeId,
    method: 'delete'
  })
}

// 导出新闻分类
export function exportPressType(query) {
  return request({
    url: '/smartservice/pressType/export',
    method: 'get',
    params: query
  })
}